import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
import Home from '../views/Home.vue'
import Specification from '../views/admin/Specification.vue'
import Manager from '../views/admin/Manager.vue'
import Typetemlate from '../views/admin/Typetemplate.vue'
import Item from '../views/admin/Item.vue'
import Content from '../views/admin/Content.vue'
import Contentcate from '../views/admin/Contentcate.vue'
import login from "@/views/login.vue";

const routes: Array<RouteRecordRaw> = [
  {
    path:'/',
    name:'login',
    component:login,
  },
  {
    path: '/home',
    name: 'Home',
    component: Home
  },
  {
    path: '/admin/manager',
    name: 'Manager',
    component:Manager
  },
  {
    path: '/admin/specification',
    name: 'Specification',
    component:Specification
  },
  {
    path: '/admin/typetemlate',
    name: 'Typetemlate',
    component:Typetemlate
  },
  {
    path: '/admin/item',
    name: 'Item',
    component:Item
  },
  {
    path: '/admin/content',
    name: 'Content',
    component:Content
  },
  {
    path: '/admin/contentcate',
    name: 'Contentcate',
    component:Contentcate
  },
  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
